<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!--输出,条件,迭代标签库-->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="fmt"%> <!--数据格式化标签库-->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="sql"%> <!--数据库相关标签库-->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="fn"%>
<%@ taglib prefix="e" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ex" uri="/WEB-INF/tld/showInformation.tld"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%--使用自定义标签，页面中使用<%@taglib%>来指定tld文件的位置--%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>adminSalaryManagePage</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" type="text/css"
            href="/resources/css/styleSheet.css">
      <link rel="stylesheet"
            href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"
            integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N"
            crossorigin="anonymous">
      <link
              href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css"
              rel="stylesheet">
      <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
      <script
              src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>

<body style="padding-top: 10%;overflow:Scroll;overflow-x:hidden">
  <ex:Banner/>
  <div class=" row container_fluid">
    <jsp:include page="managerIndex.jsp" />
      <div class="col-sm-10">


          <form action="${pageContext.request.contextPath}/admin/findSalaryByKeys" method= "GET" id="find-salary-form">
              <div class="row">
                  <div class="col-sm-3 col-md-2">
                      <input type="text" class="form-control" name="keys" placeholder="关键字" aria-describedby="basic-addon1">
                  </div>
                  <button class="btn btn-primary"  type="submit" data-dismiss="modal">查询</button>
              </div>
          </form>


          <div class="row" style="margin-top: 30px">
              <div class="col-sm-11">
                  <table class="table table-bordered table-hover table-striped">
                      <tr>
                          <th style="text-align: center; white-space: nowrap;">姓名</th>
                          <th style="text-align: center; white-space: nowrap;">时间</th>
                          <th style="text-align: center; white-space: nowrap;">职位薪资</th>
                          <th style="text-align: center; white-space: nowrap;">绩效</th>
                          <th style="text-align: center; white-space: nowrap;">年资</th>
                          <th style="text-align: center; white-space: nowrap;">津贴</th>
                          <th style="text-align: center; white-space: nowrap;">税收</th>
                          <th style="text-align: center; white-space: nowrap;">总额</th>
                          <th style="text-align: center; white-space: nowrap;">实际发放</th>
                      </tr>
                      <c:forEach items="${salaryList.items}" var="salary">
                          <tr>
                              <td style="text-align: center; white-space: nowrap;"><c:out value="${salary.fullName}"/></td>
                              <td style="text-align: center; white-space: nowrap;"><c:out value="${salary.paymentDate}"/></td>
                              <td style="text-align: center; white-space: nowrap;"><c:out value="${salary.positionSalary}"/></td>
                              <td style="text-align: center; white-space: nowrap;"><c:out value="${salary.performanceSalary}"/></td>
                              <td style="text-align: center; white-space: nowrap;"><c:out value="${salary.senioritySalary}"/></td>
                              <td style="text-align: center; white-space: nowrap;"><c:out value="${salary.allowance}"/></td>
                              <td style="text-align: center; white-space: nowrap;"><c:out value="${salary.taxation}"/></td>
                              <td style="text-align: center; white-space: nowrap;"><c:out value="${salary.totalSalaryAmount}"/></td>
                              <td style="text-align: center; white-space: nowrap;"><c:out value="${salary.actualPayAmount}"/></td>
                          </tr>
                      </c:forEach>
                  </table>
              </div>
          </div>


          <ul class="col-md-12">
              <div class="col-md-offset-3 col-md-2 ">
                  <c:if test="${salaryList.currentPageNo == 1}">
                      <ul class="pager">
                          <li class="disabled">上一页</li>
                      </ul>
                  </c:if>
                  <c:if test="${salaryList.currentPageNo != 1}">
                      <ul class="pager">
                          <li><a href="<c:url value="${pageContext.request.contextPath}/admin/checkAllSalary?pageNo=${salaryList.currentPageNo-1}" />">上一页</a></li>
                      </ul>
                  </c:if>
              </div>

              <div class="col-md-4">
                  <nav aria-label="Page navigation">
                      <ul class="pagination">
                          <c:forEach begin="1" end="${salaryList.totalPageCount}" var="i">
                              <c:if test="${salaryList.currentPageNo == i}">
                                  <li class="disabled">
                                      <a href="${pageContext.request.contextPath}/admin/checkAllSalary?pageNo=${i}">${i}</a>
                                  </li>
                              </c:if>
                              <c:if test="${salaryList.currentPageNo != i}">
                                  <li>
                                      <a href="${pageContext.request.contextPath}/admin/checkAllSalary?pageNo=${i}">${i}</a>
                                  </li>
                              </c:if>
                          </c:forEach>
                      </ul>
                  </nav>
              </div>

              <div class="col-md-2">
                  <c:if test="${salaryList.currentPageNo == salaryList.totalPageCount}">
                      <ul class="pager">
                          <li class="disabled">下一页</li>
                      </ul>
                  </c:if>
                  <c:if test="${salaryList.currentPageNo != salaryList.totalPageCount}">
                      <ul class="pager">
                          <li><a href="<c:url value="${pageContext.request.contextPath}/admin/checkAllSalary?pageNo=${salaryList.currentPageNo+1}" />">下一页</a></li>
                      </ul>
                  </c:if>
              </div>
          </ul>



      </div>


  </div>

        <!--统一的尾部：版权信息-->
  <ex:Footer/>

        <!-- jQuery and JavaScript Bundle with Popper -->
        <script
                src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"
                crossorigin="anonymous"></script>
        <script
                src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
                crossorigin="anonymous"></script>
        <script
                src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.min.js"
                crossorigin="anonymous"></script>
        <script type="text/javascript" src="script.js"></script>

</body>
</html>